package com.far.game.xiuzhen.common.conf;


import com.far.game.xiuzhen.common.utils.AppUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

/*
 * @description: 读取YML中的配置初始化到静态类
 * @author mike/Fang.J/Q184377367
 * @date 2022/4/12 1:30
*/

@Configuration
public class AppConf {

    @Value("${appConf.jwtKey}")
    private String jwtKey;

    @Value("${appConf.passHash}")
    private  String memberPassHash;

    public static   String passHash;

    @PostConstruct
    public void init(){
        AppConf.passHash = this.memberPassHash;
        AppUtil.JWTKEY = jwtKey;
    }

}
